package com.a.a;

import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
import java.util.Arrays;
import java.util.List;

abstract class e extends Charset {
    private static final List a = Arrays.asList(new String[]{"US-ASCII", "ISO-8859-1", "UTF-8", "UTF-16", "UTF-16LE", "UTF-16BE"});
    final boolean b;
    a c;

    protected e(String str, String[] strArr, String str2, boolean z) {
        super(str, strArr);
        this.c = new a(str2);
        this.b = z;
    }

    abstract byte a();

    abstract boolean a(char c);

    abstract byte b();

    public boolean contains(Charset charset) {
        return a.contains(charset.name());
    }

    public CharsetDecoder newDecoder() {
        return new f(this, this.c, this.b);
    }

    public CharsetEncoder newEncoder() {
        return new g(this, this.c, this.b);
    }
}
